package com.example.mapper;

import com.example.pojo.RoomImage;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface RoomImageMapper {
    List<RoomImage> selectAll(RoomImage roomImage);

    @Select("select * from room_images where room_id = #{roomId}")
    List<RoomImage> selectById(Integer id);

    void add(RoomImage roomImage);

    void updateById(RoomImage roomImage);

    @Delete("delete from room_images where room_id = #{roomId}")
    void deleteById(Integer id);

    @Select("select * from room_images where type = #{type}")
    RoomImage selectByUsename(String type);
}
